﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPgAdmin.master" AutoEventWireup="true" CodeFile="EditUsers.aspx.cs" Inherits="Admin_EditUsers" %>
 <%@ Register assembly="AjaxControlToolkit" 
             namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register assembly="ProudMonkey.Common.Controls"
             namespace="ProudMonkey.Common.Controls" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Header1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <%--<table style="height: 206px" bgcolor="#FFFF99">
           <tr>
                 <td style="width: 4px">
                     &nbsp;</td>
                <td style="width: 3px">
                    &nbsp;</td>
                <td style="width: 4px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td style="width: 129px">
                    <asp:Image ID="Image1" runat="server" Height="137px" 
                        ImageUrl="~/Images/blue-user-icon.png" Width="135px" BackColor="#FFFF66" />
                </td>
                <td style="width: 602px">
                    <asp:RadioButtonList ID="RdRoles" runat="server" AutoPostBack="True" 
                        CellSpacing="5" Font-Size="13pt" ForeColor="#66CCFF" 
                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
                        RepeatDirection="Horizontal" style="margin-right: 28px" Width="539px" 
                        BorderColor="#99CCFF" BorderStyle="Groove" BackColor="#003366">
                        <asp:ListItem Value="MExpert">مدیریت کارشناسان</asp:ListItem>
                        <asp:ListItem Value="Fin">مدیریت مالی و انبار</asp:ListItem>
                        <asp:ListItem Value="Secr">منشی</asp:ListItem>
                    </asp:RadioButtonList>
                    <asp:Label ID="LblRAdio" runat="server" BackColor="#FF3300" BorderColor="Red" 
                        Font-Size="Small" Font-Underline="False" ForeColor="#CCFFFF" Visible="False" 
                        Width="40%"></asp:Label>
                </td>
                <td align="left" style="width: 150px">
                    &nbsp;</td>
                
                <tr>
                 <td style="width: 4px">
                     </td>
                <td style="width: 3px">
                    </td>
                <td style="width: 4px">
                    </td>
                <td>
                    </td>
                <td style="width: 129px">
                </td>
                <td style="width: 602px">
                </td>
                <td align="left" style="width: 150px">
                    </td>
                
                <tr>
                 <td style="width: 4px">
                     &nbsp;</td>
                <td style="width: 3px">
                    &nbsp;</td>
                <td style="width: 4px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td style="width: 129px">
                    &nbsp;</td>
                <td style="width: 602px">
                    <cc1:ConfirmBox ID="confirm1" runat="server" />
                    &nbsp;</td>
                <td align="left" style="width: 150px">
                    &nbsp;</td>
                
                </table>--%>
        
           

             <div style="background-image:url('../Images/body-bg.png');direction:rtl;padding-bottom:20px;padding-top:10px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
        <div style="padding-right:350px; width:100%">
        <asp:Image ID="Image2" runat="server" 
                        ImageUrl="~/Images/ManageUsers.png" Width="17%"  />
        </div>

         <div style="width:90%;margin:auto; background-image:url('../Images/content-bg.png');padding-right:8px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">

          <div style="margin-bottom:30px;padding-top:30px;padding-right:15%">
            <asp:RadioButtonList ID="RdRoles" runat="server" AutoPostBack="True" 
                        CellSpacing="5" Font-Size="13pt" ForeColor="#66CCFF" 
                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
                        RepeatDirection="Horizontal" style="margin-right: 28px" Width="539px" 
                        BorderColor="#99CCFF" BorderStyle="Groove" BackColor="#003366">
                        <asp:ListItem Value="MExpert">مدیریت کارشناسان</asp:ListItem>
                        <asp:ListItem Value="Fin">مدیریت مالی و انبار</asp:ListItem>
                        <asp:ListItem Value="Secr">منشی</asp:ListItem>
                    </asp:RadioButtonList>
                    <asp:Label ID="LblRAdio" runat="server" BackColor="#FF3300" BorderColor="Red" 
                        Font-Size="Small" Font-Underline="False" ForeColor="#CCFFFF" Visible="False" 
                        Width="40%"></asp:Label>
          </div>
             <asp:Panel ID="pnlData" runat="server" Visible="false">
             
          <div>
         
                
                
                </div>
                <div>
          <table style="width:100%;">
            <tr>
                <td>
                    <asp:Panel ID="PnlShowData" runat="server" Visible="false">
                    <div style="border: 1px solid #DEDEDE;border-radius:3px;box-shadow: 0px 0px 10px rgba(189, 189, 189, 0.4);padding :10px;width:85%;margin:auto;">
                <div  class="headerTable" >
                <div style="width:10%;float:right">
                    <asp:Image ID="Image1" runat="server" src="../Images/ava_default_1.jpg" Height="40px" />
                </div>
                <div style="width:50%;float:right">
                    <h3><asp:Label ID="Label12" runat="server" Text="اطلاعات کاربران ثبت شده"></asp:Label></h3>
                </div>
                </div>
                <div>
                    <asp:GridView ID="GrdListUser" runat="server" 
            CellPadding="3" 
            onrowcommand="GrdListUser_RowCommand" AutoGenerateColumns="False" 
            CssClass="Radi" DataKeyNames="UserId" 
            onrowediting="GrdListUser_RowEditing" BackColor="White" BorderColor="#CCCCCC" 
                        BorderStyle="None" BorderWidth="1px" Width="100%" GridLines="None" ForeColor="#333333" >
                        <AlternatingRowStyle BackColor="White"   />
            <Columns>
            <asp:BoundField DataField="نام" HeaderText="نام" />
            <asp:BoundField DataField="نام خانوادگی" HeaderText="نام خانوادگی" />
             <asp:BoundField DataField="username" HeaderText="نام کاربری" />
                <asp:BoundField DataField="UserId" Visible="False" />
                <asp:BoundField DataField="موبایل" HeaderText="شماره موبایل" />
                <asp:BoundField DataField="شماره تلفن" HeaderText="شماره تلفن" />
                <asp:BoundField DataField="آدرس" HeaderText="آدرس" />
                
               
                
                <asp:ButtonField CommandName="Revise" Text="ویرایش" />
                <asp:ButtonField CommandName="ResetPass" Text="تغییر رمز عبور" />
            <asp:TemplateField>
            <ItemTemplate>
                <asp:Button ID="Button2" runat="server" Text="غیرفعال" CommandName="Del"  CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                 OnClientClick="ShowConfirmBox(this,'آیا از غیر فعال کردن کارشناس مطمینید'); return false;"  CssClass="Button"/>
            </ItemTemplate>
            </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
                    <asp:Label ID="LblSta1" runat="server" BackColor="#FF3300" ForeColor="Yellow"></asp:Label>
                    </div>
                    </div>
                    </asp:Panel>
                  
                    
                    </td>
            </tr>
            <tr>
                <td>
                <br />
                <br />
                   <asp:Panel ID="PnlResetPass" runat="server"  
                         Visible="False">
                                <div style="width:90%;margin:auto; background-image:url('../Images/content-bg.png');padding-right:8px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
                        <table  style="width: 100%; height: 97px">
                            <tr>
                                <td style="width: 92px; height: 25px;">
                                    <asp:Label ID="Label13" runat="server" Text="نام کاربری"></asp:Label>
                                    </td>
                                <td align="right" class="style8" style="width: 267px; height: 25px;">
                                    <asp:TextBox ID="Txusername" runat="server" Enabled="False" Height="16px" 
                                        Width="164px" CssClass="textbox"></asp:TextBox>
                                    </td>
                                <td align="right" style="width: 26px; height: 25px;">
                                    </td>
                                <td align="right" style="width: 164px; height: 25px;">
                                    &nbsp;</td>
                                <td align="right" class="style2" style="height: 25px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 92px; height: 27px;">
                                    </td>
                                <td align="right" class="style8" style="width: 267px; height: 27px;">
                                    </td>
                                <td align="right" style="width: 26px; height: 27px;">
                                    </td>
                                <td align="right" style="width: 164px; height: 27px;">
                                    </td>
                                <td align="right" style="height: 27px">
                                    </td>
                            </tr>
                            <tr>
                                <td style="width: 92px; height: 24px;">
                                    <asp:Label ID="Label14" runat="server" Text="رمز عبور"></asp:Label>
                                    </td>
                                <td align="right" class="style8" style="width: 267px; height: 24px;">
                                    <asp:TextBox ID="TxPass" runat="server" Height="16px" TextMode="Password" 
                                        Width="162px" CssClass="textbox"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 26px; height: 24px;">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="TxPass" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>
                                <td align="right" style="width: 164px; height: 24px;">
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="TxPass" ErrorMessage="حداقل 6 کاراکتر وارد کنید" 
                                        ForeColor="Red" ValidationExpression=".{6,}"></asp:RegularExpressionValidator>
                                </td>
                                <td align="right" style="height: 24px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 92px; height: 21px;">
                                    <asp:Label ID="Label10" runat="server" Text="تکرار کلمه عبور "></asp:Label>
                                    </td>
                                <td align="right" class="style8" style="width: 267px; height: 21px;">
                                    <asp:TextBox ID="TxConf" runat="server" Height="16px" TextMode="Password" 
                                        Width="161px" CssClass="textbox"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 26px; height: 21px;">
                                    <asp:RequiredFieldValidator ID="Regconf" runat="server" 
                                        ControlToValidate="TxConf" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                </td>
                                <td align="right" style="width: 164px; height: 21px;">
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                        ControlToCompare="TxPass" ControlToValidate="TxConf" 
                                        ErrorMessage="رمز عبور با تکرار یکسان نیست" ForeColor="Red"></asp:CompareValidator>
                                </td>
                                <td align="right" style="height: 21px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 92px; height: 14px;">
                                    </td>
                                <td align="right" class="style8" style="width: 267px; height: 14px;">
                                    <asp:Button ID="BtnRevise" runat="server"  
                                        onclick="BtnRevise_Click" Text="تغییر کلمه عبور" Width="150px" CssClass="Button" />
                                </td>
                                <td align="right" style="width: 26px; height: 14px;">
                                    </td>
                                <td align="right" colspan="2" style="height: 14px">
                                    <asp:Label ID="LblSta" runat="server" BackColor="#0033CC" BorderColor="Red" 
                                        ForeColor="Red"></asp:Label>
                                </td>
                            </tr>
                        </table>
                        </div>
                    </asp:Panel>
                      <asp:Panel ID="PnEdit" runat="server" Height="314px" Visible="False" >
                        <table class="style1" width="100%" >
                            <tr>
                                <td align="right" bgcolor="#000066" colspan="4">
                                    <asp:Label ID="Label11" runat="server" ForeColor="White" Text="ویرایش کاربران"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                            <td></td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    <asp:Label ID="Label15" runat="server" CssClass="Radi" Text="نام"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    <asp:TextBox ID="Txname" runat="server" CssClass="textbox" Height="16px" 
                                        Width="161px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 85px">
                                    <asp:Label ID="Label6" runat="server" CssClass="Radi" Text="تلفن تماس"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:TextBox ID="Txpho" runat="server" CssClass="textbox"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    &nbsp;</td>
                                <td align="right" style="width: 283px">
                                    &nbsp;</td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    <asp:Label ID="Label2" runat="server" CssClass="Radi" Text="نام خانوادگی"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    <asp:TextBox ID="Txfamil" runat="server" CssClass="textbox" Height="16px" 
                                        Width="164px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 85px">
                                    <asp:Label ID="Label7" runat="server" CssClass="Radi" Text="شماره موبایل"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:TextBox ID="TxMobil" runat="server" CssClass="textbox"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    &nbsp;</td>
                                <td align="right" style="width: 283px">
                                    &nbsp;</td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    <asp:Label ID="Label3" runat="server" CssClass="Radi" Text="نام کاربری"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    <asp:TextBox ID="Txuser" runat="server" CssClass="textbox" Enabled="False" 
                                        Height="16px" Width="165px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    &nbsp;</td>
                                <td align="right" style="width: 283px">
                                    &nbsp;</td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 85px" align="right">
                                    <asp:Label ID="Label4" runat="server" CssClass="Radi" Text="آدرس ایمیل"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    <asp:TextBox ID="TxEmail" runat="server" CssClass="textbox" Height="18px" 
                                        Width="166px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    <asp:Label ID="Label5" runat="server" CssClass="Radi" Text="محل سکونت"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    <asp:TextBox ID="Txadd" runat="server" CssClass="textbox" Height="19px" 
                                        Width="164px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 85px">
                                    <asp:Button ID="Button1" runat="server" CssClass="Button" 
                                        onclick="Button1_Click1" Text="بازگشت" Width="101px" />
                                </td>
                                <td align="right">
                                    <asp:Button ID="BtnEdit" runat="server" CssClass="Button" 
                                        onclick="BtnEdit_Click" Text="ثبت ویرایش" />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 85px">
                                    <asp:Label ID="Status" runat="server" BackColor="#3399FF" BorderColor="Yellow" 
                                        ForeColor="Yellow"></asp:Label>
                                </td>
                                <td align="right" style="width: 283px">
                                    &nbsp;</td>
                                <td align="right" style="width: 85px">
                                    &nbsp;</td>
                                <td align="right">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="4" style="height: 14px;">
                                    &nbsp;</td>
                            </tr>
                           
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            </table>
           
            </div>
          </div>
          </asp:Panel>
          <br />
          <br />
          </div>
        </div>
              
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" Runat="Server">
</asp:Content>

